package io.github.xbeeant.eoffice.model;

import io.github.xbeeant.core.BaseModelObject;
import java.io.Serializable;

/**
 * 
 * eoffice_resources_perm
 */
public class ResourcesPerm extends BaseModelObject<Long> implements Serializable {
    /**
     * 
     * 权限ID
     */
    private Long pid;

    /**
     * 
     * 目标用户ID，可以是分组ID gid 或用户ID uid
     */
    private Long targetId;

    /**
     * 
     * 资源ID, 资源ID为0 表示的是文件夹的权限
     */
    private Long rid;

    /**
     * 
     * 注释权限
     */
    private Boolean comment;

    /**
     * 
     * 拷贝权限
     */
    private Boolean copy;

    /**
     * 
     * 删除注释权限
     */
    private Boolean deleteCommentAuthorOnly;

    /**
     * 
     * 下载权限
     */
    private Boolean download;

    /**
     * 
     * 编辑权限
     */
    private Boolean edit;

    /**
     * 
     * 编辑注释权限
     */
    private Boolean editCommentAuthorOnly;

    /**
     *
     * eoffice_resources_perm.fill_forms
     */
    private Boolean fillForms;

    /**
     *
     * eoffice_resources_perm.modify_content_control
     */
    private Boolean modifyContentControl;

    /**
     *
     * eoffice_resources_perm.modify_filter
     */
    private Boolean modifyFilter;

    /**
     *
     * eoffice_resources_perm.print
     */
    private Boolean print;

    /**
     *
     * eoffice_resources_perm.review
     */
    private Boolean review;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table eoffice_resources_perm
     *
     * @mbg.generated Sat Jul 10 16:47:03 CST 2021
     */
    private static final long serialVersionUID = 1L;

    /**
     * get field 权限ID
     * @return pid 权限ID
     */
    public Long getPid() {
        return pid;
    }

    /**
     * set filed 权限ID
     * @param pid the value for 权限ID
     */
    public void setPid(Long pid) {
        this.pid = pid;
    }

    /**
     * get field 目标用户ID，可以是分组ID gid 或用户ID uid
     * @return targetId 目标用户ID，可以是分组ID gid 或用户ID uid
     */
    public Long getTargetId() {
        return targetId;
    }

    /**
     * set filed 目标用户ID，可以是分组ID gid 或用户ID uid
     * @param targetId the value for 目标用户ID，可以是分组ID gid 或用户ID uid
     */
    public void setTargetId(Long targetId) {
        this.targetId = targetId;
    }

    /**
     * get field 资源ID, 资源ID为0 表示的是文件夹的权限
     * @return rid 资源ID, 资源ID为0 表示的是文件夹的权限
     */
    public Long getRid() {
        return rid;
    }

    /**
     * set filed 资源ID, 资源ID为0 表示的是文件夹的权限
     * @param rid the value for 资源ID, 资源ID为0 表示的是文件夹的权限
     */
    public void setRid(Long rid) {
        this.rid = rid;
    }

    /**
     * get field 注释权限
     * @return comment 注释权限
     */
    public Boolean getComment() {
        return comment;
    }

    /**
     * set filed 注释权限
     * @param comment the value for 注释权限
     */
    public void setComment(Boolean comment) {
        this.comment = comment;
    }

    /**
     * get field 拷贝权限
     * @return copy 拷贝权限
     */
    public Boolean getCopy() {
        return copy;
    }

    /**
     * set filed 拷贝权限
     * @param copy the value for 拷贝权限
     */
    public void setCopy(Boolean copy) {
        this.copy = copy;
    }

    /**
     * get field 删除注释权限
     * @return deleteCommentAuthorOnly 删除注释权限
     */
    public Boolean getDeleteCommentAuthorOnly() {
        return deleteCommentAuthorOnly;
    }

    /**
     * set filed 删除注释权限
     * @param deleteCommentAuthorOnly the value for 删除注释权限
     */
    public void setDeleteCommentAuthorOnly(Boolean deleteCommentAuthorOnly) {
        this.deleteCommentAuthorOnly = deleteCommentAuthorOnly;
    }

    /**
     * get field 下载权限
     * @return download 下载权限
     */
    public Boolean getDownload() {
        return download;
    }

    public boolean hasPermission() {
        return Boolean.TRUE.equals(download)
                || Boolean.TRUE.equals(edit)
                || Boolean.TRUE.equals(print);
    }

    /**
     * set filed 下载权限
     * @param download the value for 下载权限
     */
    public void setDownload(Boolean download) {
        this.download = download;
    }

    /**
     * get field 编辑权限
     * @return edit 编辑权限
     */
    public Boolean getEdit() {
        return edit;
    }

    /**
     * set filed 编辑权限
     * @param edit the value for 编辑权限
     */
    public void setEdit(Boolean edit) {
        this.edit = edit;
    }

    /**
     * get field 编辑注释权限
     * @return editCommentAuthorOnly 编辑注释权限
     */
    public Boolean getEditCommentAuthorOnly() {
        return editCommentAuthorOnly;
    }

    /**
     * set filed 编辑注释权限
     * @param editCommentAuthorOnly the value for 编辑注释权限
     */
    public void setEditCommentAuthorOnly(Boolean editCommentAuthorOnly) {
        this.editCommentAuthorOnly = editCommentAuthorOnly;
    }

    /**
     * get field eoffice_resources_perm.fill_forms
     * @return fillForms eoffice_resources_perm.fill_forms
     */
    public Boolean getFillForms() {
        return fillForms;
    }

    /**
    eoffice_resources_perm.fill_forms
     *
     * @param fillForms the value for eoffice_resources_perm.fill_forms
     */
    public void setFillForms(Boolean fillForms) {
        this.fillForms = fillForms;
    }

    /**
     * get field eoffice_resources_perm.modify_content_control
     * @return modifyContentControl eoffice_resources_perm.modify_content_control
     */
    public Boolean getModifyContentControl() {
        return modifyContentControl;
    }

    /**
    eoffice_resources_perm.modify_content_control
     *
     * @param modifyContentControl the value for eoffice_resources_perm.modify_content_control
     */
    public void setModifyContentControl(Boolean modifyContentControl) {
        this.modifyContentControl = modifyContentControl;
    }

    /**
     * get field eoffice_resources_perm.modify_filter
     * @return modifyFilter eoffice_resources_perm.modify_filter
     */
    public Boolean getModifyFilter() {
        return modifyFilter;
    }

    /**
    eoffice_resources_perm.modify_filter
     *
     * @param modifyFilter the value for eoffice_resources_perm.modify_filter
     */
    public void setModifyFilter(Boolean modifyFilter) {
        this.modifyFilter = modifyFilter;
    }

    /**
     * get field eoffice_resources_perm.print
     * @return print eoffice_resources_perm.print
     */
    public Boolean getPrint() {
        return print;
    }

    /**
    eoffice_resources_perm.print
     *
     * @param print the value for eoffice_resources_perm.print
     */
    public void setPrint(Boolean print) {
        this.print = print;
    }

    /**
     * get field eoffice_resources_perm.review
     * @return review eoffice_resources_perm.review
     */
    public Boolean getReview() {
        return review;
    }

    /**
    eoffice_resources_perm.review
     *
     * @param review the value for eoffice_resources_perm.review
     */
    public void setReview(Boolean review) {
        this.review = review;
    }

    @Override
    public Long valueOfKey() {
        return pid;
    }

    @Override
    public void assignKeyValue(Long value) {
        this.pid = value;
    }
}